using IQIGame.Onigao.Framework.Serialization;

namespace IQIGame.Onigao.Game
{
    public partial class CFSMConfig : ISerializeByteBuf
    {
        public void DeSerialize(ByteBuf _buf)
        {
            name = _buf.ReadString();
            conditions = _buf.DeSerializeList<CFSMConditionCfg>();
            states = _buf.DeSerializeList<CFSMStateCfg>();
        }

        public void Serialize(ByteBuf _buf)
        {
            _buf.WriteString(name);
            _buf.SerializeList(conditions);
            _buf.SerializeList(states);
        }
    }
}
